<%--
  Created by IntelliJ IDEA.
  User: user
  Date: 2024/6/4
  Time: 9:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%--页面域，只能够在当前页面中进行获取--%>
<%
pageContext.setAttribute("pageContext","pageContext");
Object requestData=pageContext.getAttribute("pageContext");
%>
<%=requestData%>
<%--请求域--%>
<%
    request.setAttribute("request","request");
%>
<%--会话域--%>
<%
    session.setAttribute("session","session");
%>

<%--应用域--%>
<%
    application.setAttribute("application","application");
%>


<%--request.getRequestDispatcher转发
 response.sendRedirect为重定向，注意转发和重定向的区别
--%>
<%
request.getRequestDispatcher("show2.jsp").forward(request,response);
//    response.sendRedirect("show2.jsp");
%>


</body>
</html>
